#include <rtos/thread.h>


namespace os {
/**
 * @brief 线程表表头
 */
TaskLists* taskLists_head = nullptr;

void Thread::taskLists_push_back(TaskHandle_t const& task) {
    auto* p = new (TaskLists);
    p->ptr = task;
    p->next = taskLists_head;
    taskLists_head = p;
}

Thread* createThread(uint16_t const size, void* param, uint32_t const priority, Thread::ThreadFnType const& entry) {
    return new Thread(entry, "", size, param, priority);
}
}  // namespace os